package com.devsoft.foodflip;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainMenuActivity extends Activity {
	

	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_main_menu);						//sets content to activity_main_menu.xml
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);	//locks screen into landscape mode
		
		final Button buttonSP = (Button) findViewById(R.id.singleplayer);	//creates buttons for navigation
		final Button buttonMP = (Button) findViewById(R.id.multiplayer);
		final Button buttonOptions = (Button) findViewById(R.id.options);
		final Button buttonUnlocks = (Button) findViewById(R.id.unlocks);
        
        buttonSP.setOnClickListener(new View.OnClickListener()				//all buttons listen for action then start appropriate intents 
        {
            public void onClick(View v) 
            {
            	Intent intent = new Intent(MainMenuActivity.this, SingleplayerActivity.class);
                startActivity(intent);
                
            }
            
        });
        
        buttonMP.setOnClickListener(new View.OnClickListener() 
        {
            public void onClick(View v) 
            {
            	Intent intent = new Intent(MainMenuActivity.this, MultiplayerActivity.class);
                startActivity(intent);
                
            }
            
        });
        
        buttonOptions.setOnClickListener(new View.OnClickListener() 
        {
            public void onClick(View v) 
            {
            	Intent intent = new Intent(MainMenuActivity.this, OptionsActivity.class);
                startActivity(intent);
                
            }
            
        });
        
        buttonUnlocks.setOnClickListener(new View.OnClickListener() 
        {
            public void onClick(View v) 
            {
            	Intent intent = new Intent(MainMenuActivity.this, UnlocksActivity.class);
                startActivity(intent);
                
            }
            
        });
        
	}
	

	@Override
	public boolean onCreateOptionsMenu(Menu menu) 
	{
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main_menu, menu);
		return true;
		
	}

}
